package cho114366.basic;

public class J13_Q77_books_OOP {

	public static void main(String[] args) {
		// 도서 관리 시스템(OOP)
		J13_Book book = new J13_Book(12345,
				"누구나 알기 쉬운", "혜지원", "카와바타케시",
				"미스테리스릴러", "22500", 
				false, "2014-06-10");
		J13_Book[] books=new J13_Book[5];
		//대여한 책을 저장하기 위해 배열 선언
		books[0]=book;
		J13_Member member=
				new J13_Member(11,"김서진","011-322-3133",
						books,12345);
		System.out.println(book.toString());//기본 static으로 선언되어 있음
	}// main

}// class

class J13_Book {
	private int bookno;
	private String bookname;
	private String publisher;
	private String author;
	private String genre;
	private String price;
	private boolean isRent;
	private String regdate;

public J13_Book(int bookno,String bookname,
		String publisher,String author,
		String genre,String price,
		boolean isRent,String regdate
		
		){
	this.author=author;
	this.bookname=bookname;
	this.bookno=bookno;
	this.genre=genre;
	this.isRent=isRent;
	this.price=price;
	this.publisher=publisher;
	this.regdate=regdate;
	
}
@Override
public String toString() {
	String bookInfo = "도서명:"+bookname;
	bookInfo+="출판사:"+publisher;
	return bookInfo;
}

}

class J13_Member {
	private int memberno;
	private String name;
	private String telno;
	private J13_Book[] rbooknos;
	/*
	 * private J13_Book rbook1; // 대여중인 책 private J13_Book rbook2; // 대여중인 책
	 * private J13_Book rbook3; // 대여중인 책 private J13_Book rbook4; // 대여중인 책
	 * private J13_Book rbook5; // 대여중인 책
	 */
	
	private int mileage;

public J13_Member(int memberno,String name,
		String telno,J13_Book[] rbooknos,int mileage){
	this.memberno=memberno;
	this.name=name;
	this.telno=telno;
	this.rbooknos=rbooknos;
	this.mileage=mileage;
}
	
}